Solved problem 2