Adding syncing code