adding functor to linear regression