Added a math function