treetable: api amd impl separated