event rewrite