Random number algorithim.