added some error checking for bad api key