refactored tests a bit