remove duplicate codes in XuanHuo