text refactoring