Implementing tree for TOC