"delete" function problem