removed unused variable in range_beg_len