refactoring, test coverage