solve problem 16