Rewrite scrambling