Solved problem 4