change cloud code to use .sync
change cloud code to use .sync