added graphical models stuff