finding xij and matching labels to kluster centroids