Merging function plus a linear model!