Modelling the cortical mechanisms of working memory