added posteriors computation