Lab2: Ex3, Fixed the solver to minimize solution