relocated waitforupdates sample