Added t function to simplify using tree