Initial commit of functions from github.com/btracey/optimize

methods not be called?