add treeview functions.