logics for sync