- Tweaked optimization function interface again