added the pre order to tree