added non-recursive preorder fxn