[mod] update Markov Chain code