Added method for getting the nodes for threads.