Modified kmeans example