handle multiple requests and runs the callback when the last one is done