What is the principle of optical switch?