corrected Solver.java