initial version of working network demuxing