Added "SortByCenters" functionality