little refactoring for fluent interface to build tree