replaced rand() with random()