update invoke and wait