preorder iterative and recur