added a printout of # threads