Solved Problem 6
Solved problem 7
Solved problem 8