put best fit coeffs in separate function