modefied the posterior accumilations part