lagrange fn
cleaning