using improved markov token tree algorithm