add iterative traversal