First draft of indexer