refactoring some test stuff