removed event loop stuff