heuristic to use squared euclidean distance