index access converted to iterator