refactoring slowly