Added pseudocode for random function