solve problem 2