Designing the rewrite