added multiplex util

how do i know it works? cause i coded it last year and was too lazy to
recode, so i copied it