converts math functions