testing asynchronous functions