redid that way that the history was stored