better logic for humidify/dehumidify