Here you name it "tree", but in the function signature it is called path, maybe make the two equals as the mean the same ?