update method in weather.java