prepare for DBSCAN algorythm