tree pre-order topdown