traverse tree