Passes all test cases