fixed a syntax error
finished Math functions