rewrite emit