another try at a resource buf api