added: the recursive and iterative tree traversals