completing refactoring