Code for HistoryCrawl tool