the function of switch modle enabled and disabled