refactored the tests a bit