works but math funky