refactored linear model base class