implement quadratic objectives