implemented data structure for history storage