treetable: api amd impl separated 2