Solved problem 2
Solved problem 3