make get_range iterate properly