fixed dirichlet distribution and common cause module to work with environments
worked on improving dirichlet dist