add tree type for managing pre-order stack (doesn't work)