document the remainder of the markov chains code