Switch master and worker