first implementation of Solver.java