add tree initialization
revise tree
move read methods, refactor