the thread for randomness