finished find_centroid