from opengm master to my fork

from opengm master to my fork