rewrite complete