add stream.end()