Incorporated maths handler function