getting tree heirarchy #time 30m