the byproducts of producing gold