made monom_factor grounding more efficient