Add base logic for syncing

I've seen that after commenting.