working on the solver