blog example
move decision on when to sync into waitForSync() itself