Recode for the historyBuffer functions