Some crappy and not working markov chain implementation