Update wait all code