explain how asynchronous queries work