put the k-means clustering into a script