refactoring, +test