with correct indices wrt the iterator