Added an optional function to random number code so different distrubutions can be created.