implement getDataFromFile() and printTreeGrp()