deep refactoring