Working on tree builder