refactored weather module