added coeff fun