added threads deletion