Updating the math functions