Added appendSegment