rm rewrite