Rewrite partially done