Created new algorithms for calculating centres.