Children were randomised ( 1:1 ratio , by computer-generated sequence with permuted block design , stratified by study site and exacerbation frequency [ 1-2 vs 3 episodes in the preceding 12 months ] ) to receive either azithromycin ( 30 mg/kg ) or placebo once a week for up to 24 months .