typos in the new code for cdist/cdens code fixed