I don't see how this checks the linearity of the zero order term, why are you looking at all the orders and computing this `coef` term?