Added the random constructor