refactoring TemperaturRange class