added smarter normalizations for distance values