adding graphical model