change wangyi to tree structure