trying to figure out the event loop now