root is an array of ints