wrote test for demux