how to wait for change