generic_formulas almost done