refactored some of the test cases