refactoring doctors