updated the way history data is processed