add rewriter