added new attribute for center of mass