rename updateDocument to beforeSave