a new way of making the request loop wait for data