upgrade the range iterator to a random access iterator