implement correct buffer pooling