update kmeans macro