implemented DBSCAN