add kmeans_twodim macro