KMeans algorithm is now generic