added comments to prior() and posterior(). corrected prior()