problem 16 solution