wrote the test cases and made it to pass