solver class