Rewriting index