erased getRoot implementation in cpp file, just defined it in the declaration file.