add test cases for problem 5