made the multiplexer code more efficient