wrote all test cases