adapted to new MFlow version