medoids and centroids updated