added root node paramater