Some changes to the kmeans algorithm