add computed center of mass function