(dbscan) written; not fully tested