bug fix and add nucdist