improvements to the solver