replaced the horrid markov placeholder logic +threading changes