reformat history to make it easier to chart