functions wacky

changed math