Rewrite protocol