it can now calculate euclidean distance