iterated rewriting in a single call