put replace into rewriter