rearranged the code to create a WeatherObject instead of returning a string array