From stream sediments to groundwater chemistry: water quality control