added linear model; completed plot2