added update step for kmeans