intial treenode working code