Got second order Markov working! Going to attempt to generalize to any order of Markov chain.