refactoring utility