pulled Gurobi quadratic stuff into separate function