First working copy of dbscan