added most of the test cases