refactoring testing