refactoring of OpenWeather.java