Most of the test cases working