update function in Weather class