Bayesian Hidden Markov Model with Gibbs sampling