generic bayesnet