add thread delete feature.