add drain, refactor, rename stream to Stream