global refactoring