Implementation of Dirichlet and Mulitnomial -- not tested yet.