REWRITE WORKS