tree_reader stuff