recovery refactoring