update  cloud function