Solved problem 7