Added centroid support