added mux and demux to master for slaves