modified diff_his_ori.py