fixed error in fxn gethierarchydownfromtsn