added best distance heuristic live