add global optimization