Solve problem 7