added random selection of nodes for visualization for n_entities > 10000