Switching element function