before implementing dirichlet process