another version of the random.js