How does a gas detector work? Where is it used?