started segmentation implementation