changed afterSave to a defined Cloud function