reactivate rewriting;tests passing