multiplexor refactor