added basic markov chain support