added function to find the closest centroid values
added code to compute the new centroids after assigning x vals