fix how centers are calculated