How to filter impurities in the medium of an imported flow switch?