pre order tree traversal