finished adding tests for the optimizer