added the ability to record the coefficients of the linear regression.