add state to indexer; implement basic program control flow for sequential reading