added centroid and docs