modify for using gurobi