inorder no recursion with thread pointer