How the ventilator works