passing all test cases