Rewrite messenger function.