text parsing and mathematical functions