PIMS works by using Apatite II to control the metal concentrations in solutions, either soil pore water in soil mixing, or groundwater in a permeable reactive barrier. Using Pb as an example, with the following formula for Apatite II, the overall reaction can be written as: