refactored tests a little bit