Added test cases for problem 2