Changed sigma to calculate position relative to the center of mass