Markov Model for message distribution, source code