historical syncing logic