have cost function/gradient, but unsure if reasonable without the SQP