tests for problem 3