modify and finish Kmeans.java