added tests for the optimization API, not passing