Optimisation for the solver