linreg is now a function, should work

It returns Flag as a variable