extraction of metals from ores using electrolysis