Adding kmeans function