finalize euclidean distance and cleanse missing values functions