added rand() in NodeCount