add serialization demo to bayesian demo