changed Markov chain class