called the rewriter after prenexing