Finished assignment part 2 (Markov chaining part)