Solved problem 1