generating us for kmeans