Solved problem 5
Solved problem 6