small updates to kmeans