Use random() instead of rand()