Kmeans and Average linkage implemented