added random() to api