what are the by products of producing gold through mining