simplify coefficient calculations