beginning the rewrite