Added toCleanSegment