fill get_switch_info() function