fix the class so that markov is a instance variable