master and slave training