added two functions beta distribution