made deleted into an effective routine