starting to integrate kmeans