initial implementation of centroid prediction