added random function

that shouldn't be the case?