starting to rework the solver