passes test cases