adapting to libpgm model
adapting to libpgm model