modified tree structure

add save and load for leaf node id