rewrite is complete