fixed indexing for simpleparallel