added random() and srand()