final version of Indexer