sync logic placed properly