Second version, corrected by Cris Berneburg.