test fix? :>
calculating best distances - nasty code
best distance calculator