refactors test cases