Add base logic for syncing