MAINT: make the Markov chain functions even more flexible