modify compute_ncd.py