rewritten setCoeffs