Stage 4 Rewrite