In an intention-to-treat design , infants were randomly assigned to receive surfactant either via a thin endotracheal catheter during CPAP-assisted spontaneous breathing ( intervention group ) or after conventional endotracheal intubation during mechanical ventilation ( control group ) .