1.finish base function of master and slaver.