Not complete solution yet, only computes minimum total distance, still need to add distance between nodes that are part of minimal path.