replaced code in smux utils with custom stuff