working on the second pass after the threads