refactoring, test