attempted implementation of muxer write