modified by yuxiang