refactored the tests