changing edge to segmentation problem