added tests for P5
added tests for problem 6
adding tests for problem 7.