cleaning up limb segmentaytion procedure