added some fns; fixed plotting credible intervals