added kwargs to nlopt for simpler control of stopping