merged DBScan code from email into local git repo