refactor the tests a bit