trying to make API calls and db inserting to work