some changes on kmeans based on code review