by products used for producing metals through mining