use BufferedStream