Updated segmentation step