added some stuff to kmeans script