First step for building tree