wait for the callback