Updated wait to use the standard futures