adds tree iterator