Implemented FactorGraph API