revise kmeans