updated markov script to allow configurable ordering for string::markov