added beta distribution function that scales occs from [0,1] to (0,1)