what is the purposr of smelting gold