add tree_gen() & explore how yield keyword + generator work