by passing the gas or air or vapour through foam