pulling event machine code from monkeypatch and triggering on config value