replaced select(start, end) for select(start, offset) to keep the API consistent