Solved problem 7
Solved problem 8