Added constructor in Solver class