add beforeSave to inserts