modify by xinchin