making legcoeffs consistent with chebcoeffs