Function onDelete
final