what is the by product of producing copper through mining