make the event loop a bit nicer