add a first solution to problem 21