Update solver.cpp