added some documentation for the factor graph