A quick and dirty hack that would solve your problem can be found here: [Usual Bayesian estimation problem)