added rewriter support