first draft for dbscan