corrected the sum_coeff_j index