rewrite corrected