problem 21 solution
problem 22 solution