adding nearest centroid