added generator using R's unif_rand