Solve problem 16