to finish the solver