Solver for the general problem
quick change