what are valves and what are they used for?