solve problem 12