Added a test for problem 8