Revised formulas to use "with()"