extracting metals from their ores