Working on factorgraphfactory