explained the switch macro