First implementation of Solver