saving to db
building get request functionality for historical data