add Master/slave switch feacture