more centroid stuff