Implemented adaptSegment