Added event loop