toms changes for linear regression