added data_switch_n.m