can yum make a helper function of this offset creation so that u can use it here and in the apply_out_of_range ?