working on a linearity check