what is the byproduct of producing copper through mining