Got centroid calculation to work on server