kmeansCluster algorithm modified