Added cloud function