use precalculated centroids