updated linreg to be on range