construction of node's tree