update master-slave