Calc_coeffs change to include numjoints