added db management and pull data function for testing on heroku