added markov chain gen