add optimized length_list