finishing refactoring