switch from offset_min / offset_max to offset / length API