add the computation of the COM