readjust the centroids based on the cluster assignments given to the datapoints