added rand method to Monte Carlo terminal Ns and Fs