WIP: more work to implement NLOPT testing function