update with fix to get historical data