reimplemented DBSCAN