updated template with center of mass and scaling