refactoring continued