Add code for solver