how does a melting furnace work