removing global optimization code