Prototype rewrite