separate function for initializing markov chains