added networking code and changed getWeather method to take a dictionary