Added handling for non-numeric formulas