made treeview functional