Added an array where all distances of the segments are stored