refactoring in the deep