add support for switch