refactoring, test fix