refactored the solver class for the graph transversal