added an extension for kmeans