segmentation and clustering now working properly!