use indexWait