finish implementation of kmeans_agglo