Added a function to run cloud code.