rewrite Indexer