Optmization of number of threads removed