Solved problems 2 and 5
Solved problem 6