first working rewriter