structure of switch