How working memory enables fluid reasoning