Added n-order Markov model ability.