added randomness and markov examples