satisfying all the test cases