refactored temperature class file