update cloud function