mayor refactoring