Rewriting data