first draft of indexer