updating segmentation