use buffer for stream test