implemented WordMarkovModel for part 2 of assignment 3