add tree_get function and test