A branching unit for delivering a respiratory gas of a subject is disclosed herein. The branching unit includes a first limb for delivering an expiratory gas during an expiratory phase and a second limb for delivering an inspiratory gas during an inspiratory phase. The branching unit also includes a third limb connecting with the first limb and the second limb for delivering both said expiratory gas and said inspiratory gas and at least one port for a medical appliance.