Updated mayor function