added random function
added random function