iteration with kmeans