Solve problem 2