DBSCAN initial implementation