added the markov chain