asynchronous anonymous functions and the event loop