expanded parser to take in whole math functions