Add solution for problem 4
Add solutions for problems 5-7