created best-path data structure