segmentation func
segmentation func