optimizing with SLSQP