added functionality to activate/deactivate optimizer rules