Waitforupdatesex example