working prototype of indexer