add tree traversal algrithm