updated internal gradient computation in TestQPOases