Add root node before looping allocate table