added tests for problem 3