attach to stream end