updated switch, event behavior