improved segmentation