created a general segmentation workflow