added historical data and parsing