update center of gravity