Changed rule to rewrite