saving data to sync