metal-to-semiconductor switching