updating it so that it set the threads correctly