implement new event loop