corrected euclidean distance to take absolute value