seems like you are re-implementing the abstraction provided by `get_range` by handling pagination like this