Function 'toListSegment' is now much faster!