implemented error checking for forecast api call
removed p statement