replaced rand() with thread-safe random() in class StochasticForwardingPolicy