improve a bit the KMedoids algorithm