random function added - V0 - alpha version