Added test cases from patrick