initial copy over from recent changes in bayesact SVN