update test cases for problem 8