Add base logic for sync