changes to math stuff