implementing the multiplexers