heuristicDistance realized