markov chain generation works