added kmeans reduction