preorder traversal no recursion