begin rewriting