getting centroid from a clustering
fixed dependency cycle