Changes on the random function