refactoring documents