added call to rewriter