add a event loop