improve formula for ols
improve formula for ols