add switch_dict to allow string switches