KMeans implementation using Lens