added call to mergeSegments