created a sphere segmentation method