Have working partials and variance calcs, now need minimization function