why do you need this Boolean vector to store whether a node is the root?