now using random package to generate beta distribution