Removed unnecessary pathToRoot