init cloud code