Solved problem 5