testing and test refactoring