refactor pooling to leave room for native impl