added random_shuffle to generate a sequence of random unrepeated nodeIDs

to handle unvisited nodes