center of mass function