list wizardry to remove segments when trim end indices ...