working and checked linear model