get kmeans function somewhat working