add markov chain for lua