refactor into parent/child pom + probability matrix
markov chain - to finish query function