Start implementing calculation of nonlinearity.