new version for bayesian working memory