refactorisation for equation
cleanup