Some script for segmentation