Now handling long formulas