add commit function to treeview