add Tsung-Chuan's code