started implementation of factors for markov networks