The origin of the first valves