cleans up forecast api code