parallelized the loop that determines whether cluster centroid has changed