Added the random function + documentation.