made markov threading a bit better