lab1: add almost working indexer solution