Implemented configurable buffer size.