Added the implementation for multiplexing.