When HCl is mixed with metal sulfides in the sediment, a reaction occurs that generates H2S and liberates the metal ion into aqueous form, as shown in Equation 4. The gas formed by this process accumulates in the trap connected to the flask. By weighing the trap before and after the extraction process, the amount of H2S produced by the reaction can be calculated.