changed set_len_arr