switching elements example