HistoryToString method.